import request from '@/utils/request'

// 查询我的消息列表
export function myMessages(query) {
  return request({
    url: '/partybuilding/Message/myMessages',
    method: 'get',
    params: query
  })
}
// 已读
export function readSet(data) {
  return request({
    url: '/partybuilding/Message/readSet',
    method: 'post',
    params: data
  })
}

// 查询消息列表
export function listMessage(query) {
  return request({
    url: '/partybuilding/Message/list',
    method: 'get',
    params: query
  })
}

// 查询消息详细
export function getMessage(id) {
  return request({
    url: '/partybuilding/Message/' + id,
    method: 'get'
  })
}

// 新增消息
export function addMessage(data) {
  return request({
    url: '/partybuilding/Message/add',
    method: 'post',
    data: data
  })
}

// 修改消息
export function updateMessage(data) {
  return request({
    url: '/partybuilding/Message/edit',
    method: 'post',
    data: data
  })
}

// 删除消息
export function delMessage(id) {
  return request({
    url: '/partybuilding/Message/remove/' + id,
    method: 'post'
  })
}
